package com.matt.foundation.constant;

import lombok.Setter;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/13
 * *******************************
 */
public class CourseEarlyConstant {

    public enum CourseStatus{
        STARTING(0, "进行中"),
        PROCESSED(1, "已完成"),
        NO_PROCESS(2, "未处理");

        @Setter
        private int code;

        @Setter
        private String value;

        CourseStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CourseStatus get(int code){
            for (CourseStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }



}
